<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>商品分类页面</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .nav_top {
            background-color: #f5f5f5;
        }

        .header {
            margin-top: 30px;
        }

        .breadcrumb {
            border: 1px solid #ddd;
        }

        .breadcrumb i {
            font-size: 15px;
        }

        .breadcrumb > li {
            text-shadow: 0 1px 0 #FFF;
            padding: 0 20px;
            position: relative;
            white-space: nowrap;
        }

        .breadcrumb > li + li:before {
            content: '';
            padding: 0;
        }

        .breadcrumb > li:after {
            content: '';
            display: block;
            position: absolute;
            top: -3px;
            right: -5px;
            width: 31px;
            height: 31px;
            border-right: 1px solid #DDD;
            border-bottom: 1px solid #DDD;
            -webkit-transform: rotate(-45deg);
            -moz-transform: rotate(-45deg);
            -o-transform: rotate(-45deg);
            transform: rotate(-45deg);
        }

        .product {
            margin-bottom: 50px;
        }

        .product span {
            width: 100%;
            display: inline-block;
            overflow: hidden;
            /* white-space: pre-wrap; */
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
<div class="container-fluid nav_top">
    <div class="navbar-header">
        <a class="navbar-brand" th:href="@{/}">淘淘商城</a>
    </div>
    <div>
        <ul class="nav navbar-nav navbar-right">
            <li class="active" th:if="${session.user}==null"><a th:href="@{/login}">亲，请登录</a></li>
            <li class="dropdown" th:unless="${session.user}==null">
                <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                   aria-expanded="false" href="#">
                    <span th:text="'欢迎您:' + ${session.user.username} + '!'"></span><span class="caret"></span></a>
                <ul class="dropdown-menu">
                    <li><a th:href="@{/user/logout}">退出</a></li>
                </ul>
            </li>
            <li>
                <a th:href="@{/user/cartList}">购物车</a>
            </li>
            <li>
                <a th:href="@{/user/order}">我的订单</a>
            </li>
        </ul>
    </div>
</div>
<div class="container">
    <!--模拟导航-->
    <div class="row header">
        <div class="col-lg-12">
            <ul class="breadcrumb">
                <li>
                    <a th:href="@{/}">首页</a>
                </li>
                <li>
                    <a th:href="@{/type/{id}(id=${type.id})}" th:text="${type.typeName}">手机</a>
                </li>
            </ul>
        </div>
    </div>
    <div class="row">
        <div class="text-center">
            <h2 style="color: #333333; font-size: 24px;">猜你喜欢</h2>
            <div class="text-center" style="font-size: 14px; color: #343639;">大牌聚惠，品质甄选</div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="products">
                <div class="col-lg-3 col-md-2 col-xs-12" th:each="product:${products}">
                    <div class="product" style="border: 1px solid gainsboro;">
                        <div class="image">
                            <a th:href="@{/product/{id}(id=${product.id})}"><img th:src="@{${product.imageUrl}}"
                                                                                 class="center-block"
                                                                                 style="width: 230px;height: 200px;"/></a>
                        </div>
                        <p style="margin-left: 5px; margin-top: 5px;"><span th:text="${product.name}">【订金预订省50】HUAWEI nova 6</span>
                        </p>
                        <p style="color: red; margin-left: 5px;"><span th:text="'￥'+${product.nowPrice}">3799.00</span>
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


</body>
</html>